package sctu.edu.java.year2016.team04.luoxinghua.day20160521.chapter5_3;

/**计算一个二维数组的和
 *
 * Created by 落叶的思恋 on 2016/5/21.
 */
public class twodimensional {
    public static void main(String[] args) {
        int sum=0;
        int [][]asd=new int[][]{{1,4,45,2,2,4},{4,5,7,8,9},{1,5,6},{1,0,2,4}};
        for (int i=0;i<asd.length;i++)
            for(int k=0;k<asd[i].length;k++)
            {
                sum=sum+asd[i][k];
            }
        System.out.println("result is "+sum);
    }
}
